createFromImage

abstract suspend fun createFromImage(imageUri: Uri, dpi: Float = 300.0f, pixelScaleFactor: Float = 1.0f, sceneLayout: SceneLayout = SceneLayout.FREE): DesignBlock

Loads the given image and creates a scene with a single page showing the image. Fetching the image may take an arbitrary amount of time, so the scene isn't immediately available.

Return

a handle to the created scene.

Parameters

imageUri

the resource of the image file.

dpi

the DPI value to use when exporting and when converting between pixels and inches or millimeter units.

pixelScaleFactor

a scale factor that is applied to the final export resolution.

sceneLayout

the desired layout of the scene.